# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php83-pecl-vld
_extname=vld
pkgver=0.18.0
pkgrel=1
pkgdesc="Dumps the internal representation of PHP 8.3 scripts - PECL"
url="https://pecl.php.net/package/vld"
arch="all"
license="BSD-2-Clause"
_phpv=83
_php=php$_phpv
depends="$_php-common"
makedepends="$_php-dev"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir/$_extname-$pkgver"

build() {
	phpize$_phpv
	./configure --prefix=/usr --with-php-config=php-config$_phpv
	make
}

check() {
	$_php -dextension=modules/$_extname.so --ri $_extname
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test TESTS=--show-diff
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	local _confdir="$pkgdir"/etc/$_php/conf.d
	install -d $_confdir
	echo "extension=$_extname" > $_confdir/$_extname.ini
}

sha512sums="
da4a675fc29f9d296c7d444cf6d2408e747326fb89e6c4752e4829997fd89ea40433cb183c0af49c69ded0c2a22954c951a765662243ffe0cba70684ab0a4f18  php-pecl-vld-0.18.0.tgz
"
